package cn.iocoder.yudao.module.crossborder.platform.controller.admin.platformapiconfig.vo;

import cn.iocoder.yudao.framework.common.pojo.PageParam;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

@Schema(description = "管理后台 - 跨境电商平台API配置分页 Request VO")
@Data
public class PlatformApiConfigPageReqVO extends PageParam {

    @Schema(description = "平台编号", example = "11830")
    private Long platformId;

    @Schema(description = "店铺编号（为空表示平台级配置）", example = "28941")
    private Long storeId;

    @Schema(description = "API类型", example = "1")
    private String apiType;

    @Schema(description = "API名称", example = "王五")
    private String apiName;

    @Schema(description = "API端点")
    private String apiEndpoint;

    @Schema(description = "HTTP方法")
    private String httpMethod;

    @Schema(description = "请求头配置JSON")
    private String requestHeaders;

    @Schema(description = "请求参数配置JSON")
    private String requestParams;

    @Schema(description = "响应映射配置JSON")
    private String responseMapping;

    @Schema(description = "每分钟请求限制")
    private Integer rateLimitPerMinute;

    @Schema(description = "每小时请求限制")
    private Integer rateLimitPerHour;

    @Schema(description = "每天请求限制")
    private Integer rateLimitPerDay;

    @Schema(description = "超时时间（秒）")
    private Integer timeoutSeconds;

    @Schema(description = "重试次数")
    private Integer retryTimes;

    @Schema(description = "重试间隔（秒）")
    private Integer retryIntervalSeconds;

    @Schema(description = "状态（0正常 1停用）", example = "1")
    private Integer status;

    @Schema(description = "是否启用")
    private Boolean enabled;

    @Schema(description = "备注", example = "你说的对")
    private String remark;

    @Schema(description = "创建时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime[] createTime;

}